<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
    //1.遍历对象中的成员  for(var 变量 in 对象  ){ }
    var obj = { name: '小明', age: 18, sex: '男' };
    for(var k in obj){
        //console.log('属性:',k);
        console.log(obj[k]);
    }

</script>